package com.qyhl.webtv.module_user.home;


import com.qyhl.webtv.commonlib.entity.intergral.ExchangerRateBean;
import com.qyhl.webtv.commonlib.entity.intergral.IntegralUserInfoBean;
import com.qyhl.webtv.commonlib.entity.user.LuckDrawAdvBean;
import com.qyhl.webtv.commonlib.entity.user.UserInfoBean;

import java.util.List;

/**
 * Created by qyhl on 2017/12/5.
 */

public class UserCenterPresenter implements UserCenterContract.UserCenterPresenter {
    private UserCenterFragment mView;

    private UserCenterModel mModel;

    UserCenterPresenter(UserCenterFragment mView) {
        this.mView = mView;
        this.mModel = new UserCenterModel(this);
    }

    @Override
    public void sendCode(String code) {
        mModel.sendCode(code);
    }

    @Override
    public void sendSuccess(String msg) {
        mView.sendSuccess(msg);
    }

    @Override
    public void sendError(String msg) {
        mView.sendError(msg);
    }

    @Override
    public void getIntegralData() {
        mModel.getIntegralData();
    }

    @Override
    public void getUserInfo(String username) {
        mModel.getUserInfo(username);
    }

    @Override
    public void integralError(String msg) {
        mView.integralError(msg);
    }

    @Override
    public void integralSuccess(IntegralUserInfoBean data) {
        mView.integralSuccess(data);
    }

    @Override
    public void getExchangerRate() {
        mModel.getExchangerRate();
    }

    @Override
    public void exchangerRateError() {
        mView.exchangerRateError();
    }

    @Override
    public void exchangerRateSuccess(ExchangerRateBean data) {
        mView.exchangerRateSuccess(data);
    }


    @Override
    public void getAdvData() {
        mModel.getAdvData();
    }

    @Override
    public void setAdvList(List<LuckDrawAdvBean> beanList) {
        mView.setAdvList(beanList);
    }

    @Override
    public void userInfoSuccess(UserInfoBean bean) {
        mView.userInfoSuccess(bean);
    }

    @Override
    public void userInfoError(String msg) {
        mView.userInfoError(msg);
    }
}
